/**
 * Created by wangc on 2016/7/3.
 */
// $(function () {
//     $('.w_sf_input').click(function(){
//        $(this).parent(".w_sf_item").find(".select_citys").css({"display":"block"})
//     })
//
// })

//选中输入到输入框中
$(function(){
    $(".select_citys span").click(function(){
        var text = $(this).text();
        var ctid = $(this).attr("ctid");
        $(this).parents(".w_sf_item").find(".w_sf_input").val(text);
        $(this).parents(".w_sf_item").find(".w_sf_input").attr("ctid",ctid);
    })
})
//更多城市
window.onload = function(){
    var box = document.getElementsByClassName("w_more_city")[0];
    var hid = document.getElementsByClassName("more_city_hid")[0];
    box.onclick = function(ev){
        var ev = ev||event;
        hid.style.display = "block";
        ev.stopPropagation();
    }
    document.onclick = function(){
        hid.style.display = "none";
    }

}